package cn.daichi.elasticsearchdemo.repository;

import cn.daichi.elasticsearchdemo.model.PostDocument;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface PostRepository extends ElasticsearchRepository<PostDocument, Long> {

    Page<PostDocument> findByTitleOrContent(String title, String content, Pageable pageable);

}
